package Practice.Practice_01;

public class InterfaceTest {
    public static void main(String[] args) {
        Plane plane=new Plane();
        plane.fly();
    }
}
interface Flyable{
    //全局常量
    public static final int MAX_SPEED=7900;
    int MIN_SPEED=1; //可以省略public static final

    //抽象方法
    public abstract void fly();
    void stop(); //可以省略public abstract
}
class Plane implements Flyable{
    public void fly(){
        System.out.println("通过引擎起飞");
    }
    public void stop(){
        System.out.println("驾驶员减速停止");
    }
}
abstract class Kite implements Flyable{
}
interface Attackable{
    void attack();
}
class Bullet implements Flyable,Attackable{  //实现多个接口

    @Override
    public void fly() {

    }

    @Override
    public void stop() {

    }

    @Override
    public void attack() {

    }
}
